package com.lovo.ssc.mapper;

import com.lovo.ssc.dto.OrderDto;
import com.lovo.ssc.entity.Customer;
import com.lovo.ssc.entity.Ordergoods;
import com.lovo.ssc.entity.SysOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 订单表 Mapper 接口
 * </p>
 *
 * @author lovo
 * @since 2022-07-08
 */
@Mapper
public interface SysOrderMapper extends BaseMapper<SysOrder> {

    public void addOrder(SysOrder order);

    public List<OrderDto> findAll();

    public List<OrderDto> findByItem(@Param("type") String type,
                                     @Param("startTime")String startTime,
                                     @Param("endTime")String endTime);

    public List<Ordergoods> findById(int orderId);

    public Customer findByUserName(String userName);
}
